import { request } from '@/utils/request/request';
import { RequestEnum } from '@/enums/httpEnum';

export const rusticApi = {
  rusticList: '/rustic/list',
  rusticDetail: '/rustic/detail',
} as const;

export const getRusticList = (params: API.rusticListRequest) => {
  return request({
    url: rusticApi.rusticList,
    method: RequestEnum.GET,
    params,
  });
};

export const getRusticDetail = (params: { id: number }) => {
  return request({
    url: rusticApi.rusticDetail,
    method: RequestEnum.GET,
    params,
  });
};
